package com.doradance.model.remote;


import com.doradance.model.local.UserBean;
import com.doradance.model.remote.bean.LoginBean;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;

/**
 * Description:
 * Created by Andy Hong on 10/19/2017.
 */

public interface PassportService {


    /**
     * 登录
     *
     * @param body 登录json参数
     * @see
     */
    @POST("v1.0/login")
    Observable<LoginBean> login(@Body RequestBody body);

    /**
     * 获取用户信息
     */

    @GET("v1.0/users/self")
    Observable<UserBean> getUserInfo(@Header("Authorization") String userId);
}
